package com.cljh.mapper;

import com.cljh.bean.Dict;
import com.cljh.bean.Role;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DictMapper {

    @Insert("insert into mtmall_test.dict (name, value, type) values (#{dict.name},#{dict.value},#{dict.type});")
    int save(@Param("dict") Dict dict);

    @Delete("delete from mtmall_test.dict where name=#{id};")
    int delete(Integer id);


    int Upd(@Param("dict") Dict dict);


    @Select("select * from mtmall_test.dict;")
    List<Dict> selectAll();


    @Select("select * from mtmall_test.dict where type=#{type} ;")
    List<Dict> selectByType(@Param("type") String type);

}
